﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CfgIdeaApplyList.ascx.cs" Inherits="Lenovo.CFI.Web.VP.CfgIdeaApplyList" %>
<tbwc:StyleSheetControl ID="SscList" runat="server" CssPath="list.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SscAc" runat="server" CssPath="VP/autocomplete.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SccDialogs" runat="server" CssPath="modaldialogs.css"></tbwc:StyleSheetControl>
<tbwc:StyleSheetControl ID="SscThis" runat="server" CssPath="VP/cfg/cfgideaapplylist.css"></tbwc:StyleSheetControl>
<ajaxToolkit:ToolkitScriptManager runat="Server" EnablePartialRendering="true" CombineScripts="false" ID="ScriptManager1" />

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <div id="relatedoperation">
            <span class="op">User:<asp:TextBox ID="TxtUser" runat="server" Width="10em"></asp:TextBox></span>
            <span class="op">Status:<asp:DropDownList ID="DdlStatus" runat="server" Width="10em">
                <asp:ListItem Text="Select..." Value="-1"></asp:ListItem>
                <asp:ListItem Text="Pending" Value="1"></asp:ListItem>
                <asp:ListItem Text="Agree" Value="2"></asp:ListItem>
                <asp:ListItem Text="Reject" Value="3"></asp:ListItem>
            </asp:DropDownList></span>
            <span class="op"><asp:Button ID="BtnFilter" runat="server" Text="Filter" onclick="BtnFilter_Click" /></span>
        </div>
        <div class="dataListArea">
            <tbwc:GridViewEx ID="GvList" runat="server" SkinID="List" DataKeyNames="ID" AllowPaging="true" PageSize="20"
                OnRowDataBound="GvList_RowDataBound" OnRowCommand="GvList_RowCommand" 
                onpageindexchanging="GvList_PageIndexChanging">
                <Columns>
                    <asp:TemplateField HeaderText="No.">
                        <itemtemplate><asp:Literal ID="LtrNo" runat="server"></asp:Literal></itemtemplate>
                        <ItemStyle CssClass="listNo" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Idea Name">
                        <itemtemplate><asp:Literal ID="LtrName" runat="server"></asp:Literal></itemtemplate>
                        <ItemStyle CssClass="title" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Applicant">
                        <itemtemplate><asp:Literal ID="LtrApplicant" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="user" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Time And Reason">
                        <itemtemplate><asp:Literal ID="LtrTime" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="time" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Status">
                        <itemtemplate><asp:Literal ID="Status" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="status" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Approver and Comment">
                        <itemtemplate><asp:Literal ID="LtrApprover" runat="server"></asp:Literal></itemtemplate>
                        <itemstyle cssclass="approve" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="">
                        <ItemTemplate><asp:ImageButton ID="BtnEdit" runat="server" CausesValidation="False" CommandName="OpenEdit"
                            SkinID="ListEdit" CommandArgument='<%# Eval("ID")%>' />
                        </ItemTemplate>
                        <ItemStyle CssClass="listOp" />
                    </asp:TemplateField>
                </Columns>
            </tbwc:GridViewEx>
        </div>
        <asp:Button ID="BtnHiddenEdit" runat="Server" Style="display: none" />
        <ajaxToolKit:ModalPopupExtender ID="MpeConfirm" runat="server" TargetControlID="BtnHiddenEdit"
            PopupControlID="PnlConfirm" CancelControlID="BtnCancel" BackgroundCssClass="modalBackground"
            PopupDragHandleControlID="PnlConfirmCaption" Drag="false">
        </ajaxToolKit:ModalPopupExtender>
        <asp:Panel ID="PnlConfirm" runat="server" CssClass="modalBox detail" Style="display: none;" Width="480px">
            <asp:Panel ID="PnlConfirmCaption" runat="server" CssClass="caption" Style="margin-bottom: 10px; cursor: hand;">
                Approval</asp:Panel>
            <div><asp:Label ID="LblComment" runat="server" AssociatedControlID="TxtComment" Text="Comment" CssClass="title"></asp:Label><asp:TextBox 
                ID="TxtComment" runat="server" Width="30em" TextMode="MultiLine" Rows="3"></asp:TextBox></div>
            
            <div style="white-space: nowrap; text-align: center; margin-top:2em;">
		        <asp:Button ID="BtnAgree" runat="server" Text="Agree" OnClick="BtnAgree_Click" CausesValidation="true"/>
		        <asp:Button ID="BtnReject" runat="server" Text="Reject" OnClick="BtnReject_Click" CausesValidation="true"/>
		        <asp:Button ID="BtnCancel" runat="server" CausesValidation="false" Text="Cancel"/>
	        </div>
        </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>